﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TestWeb
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            TestDataSet();
        }
        void TestDataSet()
        {
            Framework.QueryInfo info = new Framework.QueryInfo();
            info.CustomSQL = "select * from bm_shzt";
            Dao.ExcuteDataSet(info);
        }
        private Contract.IService.IDaoService _dao;
        public Contract.IService.IDaoService Dao
        {
            get
            {
                if (_dao == null)
                {
                    _dao = (Contract.IService.IDaoService)ctx["DaoService"];
                }
                return _dao;
            }
            set
            {
                _dao = value;
            }
        }

        private Spring.Context.IApplicationContext _ctx;
        protected Spring.Context.IApplicationContext ctx
        {
            get
            {
                if (_ctx == null)
                    _ctx = Spring.Context.Support.ContextRegistry.GetContext();
                return _ctx;
            }
        }
    }
}
